import 'package:flutter_kit_dsp/flutter_kit_dsp.dart';

import '../../tool/assets.dart';

class MyHomeController extends HomeController {
  RxBool isHome = false.obs;
  RxInt currentIndex = 0.obs;
  RxList<String> titles = ['INPUT/OUT', 'EQ', 'CROSSOVER', 'DELAY', 'RGB'].obs;
  RxList<String> get items {
    final i = currentIndex.value;
    return [
      i == 0 && isHome.value == false ? assets.sum_select : assets.sum,
      i == 1 ? assets.eq_select : assets.eq,
      i == 2 ? assets.cross_select : assets.cross,
      i == 3 ? assets.delay_select : assets.delay,
      i == 4 ? assets.color_select : assets.color
    ].obs;
  }

  late final RxList<BasePage> pages;
  @override
  void onInit() {
    super.onInit();
    pages = <BasePage>[
      AppPages.pages[1] as BasePage,
      AppPages.pages[3] as BasePage,
      AppPages.pages[2] as BasePage,
      AppPages.pages[5] as BasePage,
      AppPages.pages[6] as BasePage,
    ].obs;
  }
}
